package main

import (
	"fmt"
	"log"
	"net/rpc"
)

const (
	HelloServiceName = "com.zy.HelloService"
)

func processWork(client *rpc.Client) {
	call := client.Go(HelloServiceName+".Hello", "hello", new(string), nil)
	//通道写入
	call = <-call.Done
	args := call.Args
	reply := call.Reply
	fmt.Println(args, reply)
}

func main() {
	dial, err := rpc.Dial("tcp", "localhost:8088")
	if err != nil {
		log.Fatal("Dial Exception：", err)
	}
	processWork(dial)
}
